<script type="text/javascript">

$(document).ready(function(){
	$(".list").click(function(){
		$.post("?action=switcher", {id: $(this).val(), op:$(this).attr("checked")});
	});

	$("#list_type").change(function(){
		location.href="?action=list&type="+$(this).val();
	});

	$("#list_type").val('{%$type%}');

});
</script>

<table style="font-size:small; text-align:left;">
{%foreach from=$list item=item%}
    <tr>
        <td><a href="http://friendfeed.com/{%$item->id%}" target="friendfeed">{%$item->name%}</a></td>
        <td>
            {%foreach from=$ulist key=id item=list_item%}
                <input type="checkbox" id="list_{%$item->id%}_{%$id%}" class="list" value="{%$item->id%}:{%$id%}" 
			{%if array_key_exists($item->id, (array)$list_item.feeds)%} checked="checked" {%/if%}/>
                <label for="list_{%$item->id%}_{%$id%}">{%$list_item.name%}</label>
            {%/foreach%}
        </td>
    </tr> 
{%/foreach%}
</table>


